<template>
  <div class="container">


    <micro-app
      v-if="menuInfo && token"
      disable-sandbox
      disable-scopecss
      name="home"
      :url="menuInfo.path+'?token='+token"
      :inline="true"
      :disablesandbox="true"
    ></micro-app>
  </div>
</template>

<script>
export default {
  data(){
    return {
      menuInfo:null,
      token:''
    }
  },
  watch:{
    "$store.state.menuInfo"(newVal){
      this.menuInfo = newVal
    }
  },
  mounted(){
    if(localStorage.getItem('menuInfo')){
      this.menuInfo = JSON.parse(localStorage.getItem('menuInfo'))
    }
    if(localStorage.getItem('token')){
      this.token = localStorage.getItem('token')
    }
 
  }
};
</script>

<style lang="less" scoped>
.container{
  width: auto;
  height: 100%;
  overflow: hidden;
  background: #fff;
  overflow-y: scroll;
  padding: 10px;
  border-radius: 5px;
}
</style>